#ifndef __EPSILON__X11__WINDOW_H__
#define __EPSILON__X11__WINDOW_H__

#include <X11/Xlib.h>

/**
 * Information specific to X11 windows.
 *
 */
class eWindowParametersX11 : public eWindowParameters {
public:
  /// Default constructor
  eWindowParametersX11 (void) {
    eWindowParameters ();

    flags   |= E_WF_X11;
  }

  // TODO
};

/**
 * API specific window internals (X11)
 *
 */
class eWindowX11 : eWindowInternals {
  friend class eEngine;
  friend class eWindow;
protected:

  bool create   (const eWindowParameters& parameters, eWindow* window); ///< Create the window and perform default initialization
  bool recreate (const eWindowParameters& parameters);                  ///< Recreate the window (that is, change render context properties on the fly...)
  bool destroy  (void);                                                 ///< Destroy the window and perform all cleanup

  void move          (const int& left, const int& top); ///< Move the window to the specified left and top coordinates
  void move_client   (const int& left, const int& top); ///< Move the client region of the window
  void resize        (const int& x,    const int& y);   ///< Resize the window to the specified x and y dimensions
  void resize_client (const int& x,    const int& y);   ///< Resize the client region of the window

  void show          (int cmd);                         ///< Allows you to show or hide the window.

  void update_rect   (void);                            ///< Causes the engine to requery the dimensions from the Window Manager...

  const eWindowHandle
       getNativeWindowHandle (void); ///< Returns an X11 window handle.

  static void Think (void); ///< Handle the X11 Message Pump

  
  Display* dpy;
  Window   w;
  GC       gc;
};

#endif /* __EPSILON__X11__WINDOW_H__ */
